/**
 * 
 */


import com.ls.fw.data.rdb.impl.mybatis.MybatisTempltePath;
import com.ls.fw.data.rdb.orm.freemarker.bean.GenDaoPara;
import com.ls.fw.data.rdb.orm.freemarker.bean.GenServicePara;
import com.ls.fw.data.rdb.orm.freemarker.dao.GenerateDaoJava;
import com.ls.fw.data.rdb.orm.freemarker.service.GenerateServiceJava;
import com.ls.fw.sys.auth.model.SysUserAccount;

/**
 * @author Defender 2014年3月21日 下午10:56:10
 */
public class GenerateJava {
	
	
	public static void main(String[] args) throws Exception {
		
		String entity_package_path = "com.ls.fw.sys.auth.model";// 实体路径
		String dao_package_path = "com.ls.fw.sys.auth.dao";// dao路径
		String service_package_path = "com.ls.fw.sys.auth.service";// service路径
		String srcName = "src/main/java";// 源码目录名称（默认为src）

		GenerateDaoJava g1 = new GenerateDaoJava(MybatisTempltePath.PATH);

		GenDaoPara para = new GenDaoPara();
		para.setDaoPackage(dao_package_path);
		para.setSrcDir(srcName);
		para.setPkFullName(Long.class.getName());
		g1.patchgenerateDao(SysUserAccount.class.getPackage().getName(), para );
		
		
		GenerateServiceJava g = new GenerateServiceJava(MybatisTempltePath.PATH);
		GenServicePara para1 = new GenServicePara();
	    para1.setDaoPackage(dao_package_path);
		para1.setSrcDir(srcName);
		para1.setPkFullName(Long.class.getName());
	    g.patchgenerateService(SysUserAccount.class.getPackage().getName(), para1 );
	}
}
